package com.lc.rongzecaifu.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 4/28/2016.
 */
//@HttpInlet("index/borrow_do")feedback_do
//@HttpInlet("index/feedback_do")
@HttpInlet("index/borrow_do")
public class JsonBorrowdo extends HYAsyPost {

    public String access_token;
    public String uid;
    public String borrow_type;
    public String borrow_money;
    public String borrow_interest_rate;
    public String money_collect;
    public String borrow_name;
    public String is_day;
    public String borrow_duration;


    public String borrow_use;
    public String borrow_min;
    public String borrow_max;
    public String borrow_time;
    public String repayment_type;
    public String reward_type;
    public String reward_num;
    public String is_pass;
    public String password;
    public String borrow_info;
    //还款来源
    public String repayment_source;

/*

    public JsonBorrowdo(String access_token, String borrow_duration, String borrow_info,
                        String borrow_interest_rate,
                        String borrow_max,
                        String borrow_min,



                        String borrow_money,
                        String borrow_name,
                        String borrow_time,
                        String borrow_type,  String  borrow_use, String daishou ,

                        String is_day,  String is_pass,
                        String money_collect, String   password,
                        String repayment_source,  String repayment_type,
                        String reward_num,
                        String reward_type,String uid,
                        AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.access_token = access_token;
        this.uid = uid;
        this.borrow_type = borrow_type;
        this.borrow_money = borrow_money;
        this.borrow_interest_rate = borrow_interest_rate;
        this.money_collect = money_collect;
        this.borrow_name = borrow_name;
        this.is_day = is_day;
        this.borrow_duration = borrow_duration;

        this.borrow_use = borrow_use;

        this.repayment_source=repayment_source;


        this.borrow_min = borrow_min;
        this.borrow_max = borrow_max;
        this.borrow_time = borrow_time;
        this.repayment_type = repayment_type;
        this.reward_type = reward_type;
        this.reward_num = reward_num;
        this.is_pass = is_pass;
        this.password = password;
        this.borrow_info = borrow_info;
    }
*/
    public String daishou;


    public JsonBorrowdo(String access_token, String uid, String borrow_type,
                        String borrow_money,
                        String borrow_interest_rate,
                        String money_collect,

                        String daishou,
                        String borrow_name,
                        String is_day,
                        String borrow_duration,
                        String borrow_use, String repayment_source, String borrow_min,
                        String borrow_max, String borrow_time,
                        String repayment_type, String reward_type,
                        String reward_num, String is_pass,
                        String password,
                        String borrow_info,
                        AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.access_token = access_token;
        this.uid = uid;
        this.borrow_type = borrow_type;
        this.borrow_money = borrow_money;
        this.borrow_interest_rate = borrow_interest_rate;
        this.money_collect = money_collect;
        this.borrow_name = borrow_name;
        this.is_day = is_day;
        this.borrow_duration = borrow_duration;

        this.borrow_use = borrow_use;

        this.repayment_source = repayment_source;

        this.daishou=daishou;


        this.borrow_min = borrow_min;
        this.borrow_max = borrow_max;
        this.borrow_time = borrow_time;
        this.repayment_type = repayment_type;
        this.reward_type = reward_type;
        this.reward_num = reward_num;
        this.is_pass = is_pass;
        this.password = password;
        this.borrow_info = borrow_info;
    }


    @Override
    protected Object parser(JSONObject object) {

        if (object.optString("status").equals("1")) {

            TOAST = object.optString("tips");

            return "";

        }

        TOAST = object.optString("tips");

        return null;
    }
}